import Vue from 'vue';
import Vuex from 'vuex';
import createPersistedState from "vuex-persistedstate";
Vue.use(Vuex);

export default new Vuex.Store({
  plugins:[createPersistedState()],
  state: {
    arr:["1.报名活动", "2.下单试吃","3.提交资料","4.等待审核"],
    dataadr: "广东省广州市白云区学塘山街81号",
    
    ordarr:[],
    bookone:{}
  },
  mutations: {
    changedataadr(state,arg){             	            		    
        state.dataadr=arg
        // console.log(state);
    },
    changeordarr(state,arg){
     
      state.ordarr=[...state.ordarr,...arg]
      // console.log(state.ordarr,'woshi1状态');
    },
    changebookone(state,arg){
      state.bookone={...state.bookone,...arg}
      console.log(state.bookone,'我是状态管理的bookone');
    }

  },
  actions: {
  },
  modules: {
  },
});
